package com.tianji.remark.task;

import com.tianji.remark.service.ILikedRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SyncLikeCountToDB {

    @Autowired
    private ILikedRecordService recordService;

    @Scheduled(fixedRate = 20000)
    public void syncLikeCountToDB(){
        log.info("syncLikeCountToDB定时任务开始执行。。。");
        recordService.syncLikeCountToDB();
    }
}
